From: Andrew Cooper Date: Thu, 16 Jul 2015 13:23:37 +0000 (+0200) Subject: dmar: fix double free in error paths following c/s a8bc99b X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2769 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=132231d10343608faf5892785a08acc500326d04;p=xen.git dmar: fix double free in error paths following c/s a8bc99b Several error paths would end up freeing scope->devices twice. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 8ed1e24d85..267268860a 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -88,6 +88,7 @@ static void scope_devices_free(struct dmar_scope *scope) scope->devices_cnt = 0; xfree(scope->devices); + scope->devices = NULL; } static void __init disable_all_dmar_units(void)